<script language="javascript">
    $(document).ready(function() {
        $('#data_orden').dataTable( {
            "bJQueryUI": true,
            "sPaginationType": "full_numbers",
            "oLanguage": {
                "sLengthMenu": "Mostrar _MENU_ Ordenes por pagina",
                "sZeroRecords": "Ninguna orden encontrada :(",
                "sInfo": "Mostrando _START_ a _END_ de _TOTAL_ Ordenes",
                "sInfoEmpty": "Mostrando 0 a 0 de 0 Ordenes",
                "sInfoFiltered": "(Filtrando de _MAX_ Ordenes)"
            }
        } );
    } );
</script>
<?php
$status = array('Pendiente...', 'En Progreso...', 'Revisando...', 'Revisado...', 'Rechazado...' ,'Completado');
?>
<article class="module width_full">
    <header><h3>Lista de Ordenes</h3></header>
    <div class="module_content">
        <!--        <article class="breadcrumbs_content">
                    <a href="<?php echo $this->url(array('action' => 'add-orden', 'id' => null)) ?>">Agregar Orden</a>
                </article>-->

        <table cellpadding="0" cellspacing="0" border="0" class="display" id="data_orden" width="100%">
            <thead>
                <tr>
                    <th>Orden</th>
                    <th>Fecha inicio</th>
                    <th>Fecha finalizaci&oacute;n</th>
                    <th>Estado</th>
                    <th>Cliente</th>
                    <th>Acciones</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($this->ordenes as $orden) : ?>
                    <tr>
                        <td><?php echo $orden->title; ?></td>
                        <td><?php echo $orden->create_date; ?></td>
                        <td><?php echo $orden->end_date; ?></td>
                        <td><?php echo $status[$orden->status] ?></td>
                        <td><?php echo $orden->name; ?></td>
                        <td class="center">
                            <a href="<?php echo $this->url(array('action' => 'edit-orden', 'id' => $orden->id_orden)) ?>">
                                <img src="<?php echo $this->baseUrl() ?>/public/styles/admin/images/icn_edit.png"/>
                            </a>
                            <span>&nbsp;&nbsp;&nbsp;</span>
                            <a href="<?php echo $this->url(array('action' => 'view-detail-orden', 'id' => $orden->id_orden)) ?>">
                                <img src="<?php echo $this->baseUrl() ?>/public/styles/admin/images/icn_categories.png"/>
                            </a>
                            <span>&nbsp;&nbsp;&nbsp;</span>
                            <a href="<?php echo $this->url(array('module' => 'alcance', 'action' => 'addalcance', 'id' => $orden->id_orden)) ?>">
                                <img src="<?php echo $this->baseUrl() ?>/public/styles/admin/images/icn_new_article.png"/>
                            </a>
                        </td>
                    </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    </div>
</article>